package com.ruoyi.web.controller.edh;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.QrCodeEntity;
import com.ruoyi.common.utils.wechat.WeChatQrCodeUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 微信相关接口
 *
 * @Author: HuAnze
 * @Date: 2021/2/18 9:36
 */
@RestController
@RequestMapping("/edh/wx")
@Api(tags = "二维码")
public class EdhWxQrCodeController {

    /**
     * 二维码生成
     */
    @GetMapping("/getQrcode")
    @ApiOperation("二维码生成")
    public AjaxResult getQrCode(@RequestParam("id") Long id) {
        QrCodeEntity qrCode = WeChatQrCodeUtils.getQrCode(id);
        return AjaxResult.success(qrCode);
    }

}
